namespace DotConferenceSql
{
    /// <summary>
    /// Allow to insert free text for a where statement
    /// </summary>
    public class CustomWhereStatement : WhereStatementQueryElementBase
    {
        private string m_statement;

        /// <summary>
        /// Initializes a new instance of the <see cref="CustomWhereStatement"/> class.
        /// </summary>
        /// <param name="statement">The Custom WHERE statement.</param>
        public CustomWhereStatement(string statement)
            : base()
        {
            m_statement = statement;
        }

        /// <summary>
        /// Generate the part of the query for this element.
        /// </summary>
        /// <returns>generated SQL fragment</returns>
        public override string BuildTextQuery()
        {
            return m_statement;
        }
    }
}